package com.tsll.dao;

import com.tsll.entity.PurchaseInfo;
import com.tsll.vo.PurchaseFormVo;
import com.tsll.vo.PurchaseInfoVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* @author Tian
* @description 针对采购信息表【purchaseinfo】的数据库操作Mapper
* @createDate 2024-03-21 14:29:12
* @Entity com.tsll.entity.Purchaseinfo
*/
public interface PurchaseInfoMapper {

    int deleteByPrimaryKey(Long id);

    int insert(PurchaseInfo record);

    int insertSelective(PurchaseInfo record);

    PurchaseInfo selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(PurchaseInfo record);

    int updateByPrimaryKey(PurchaseInfo record);

    // 查询采购信息
    List<PurchaseInfo> selectAll(PurchaseInfoVo purchaseInfoVo);

    //添加采购申请信息
    int insertPurchaseInfo(@Param("purchaseFormVo") PurchaseFormVo purchaseFormVo,@Param("id") Integer id);

    //根据采购申请编号删除采购申请信息
    int deletePurchaseInfoId(Integer id);

    //查询未审核的信息
    List<PurchaseInfo> selectByExamineStatus(PurchaseInfoVo purchaseInfoVo);

    //审核通过修改状态
    int updateExamineStatus(@Param("id") Integer id,@Param("examinestatus")Integer examinestatus);


    //审核驳回
    int updateReject(PurchaseInfo purchaseInfo);

    //修改购买状态
    int  updateStatusById(Integer id);



}
